package cn.ylz.ylmall.shopping.dao.persist.mapper;

import cn.ylz.ylmall.content.pojo.entity.Content;
import cn.ylz.ylmall.content.pojo.vo.ContentListItemVO;
import cn.ylz.ylmall.content.pojo.vo.ContentStandardVO;
import cn.ylz.ylmall.shopping.pojo.vo.ShoppingVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import cn.ylz.ylmall.shopping.pojo.entity.Shopping;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;


@Repository
public interface ShoppingMapper extends BaseMapper<Shopping>{

    List<ShoppingVO> showAll(Long userId);

    int updateAddQuantity(Long cartId,Integer quantity,BigDecimal totalPrice);

    Shopping selectByCartId(Long cartId);

    ShoppingVO selectCartId(Long cartId);

    int updateQuantityByCartId(Long cartId,Integer quantity);

    int updateSelected(Long cartId, Integer selected);

    int updateNumber(Long cartId,Integer number);

    int updateTotalPrice(Long cartId,BigDecimal totalPrice);

    int delete(Long cartId);

    List<ShoppingVO> showDeclineAll(Long userId);
    List<ShoppingVO> showHavingAll(Long userId);
}
